import request from '@/utils/request'

export function getRole(roleId,pageIndex,pageSize,needPage) {
  return request({
    url: '/menu/role/' + roleId,
    method: 'get',
    params:{ pageIndex,pageSize,needPage }
  })
}

export function deletePermission(roleId,menuId) {
  return request({
    url: '/menu/roleId/' + roleId,
    method: 'delete',
    params:{ menuId }
  })
}

export function insertPermission(roleId,menuId) {
  return request({
    url: '/menu/permission/' + roleId,
    method: 'post',
    params:{ menuId }
  })
}